<!DOCTYPE html>
<html lang="<%= current_locale %>">
  <head>
    <%= favicon_link_tag 'solidus_admin/favicon.ico' %>

    <title><%= solidus_admin_title %></title>
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta name="turbo-cache-control" content="no-cache">
    <meta name="turbo-prefetch" content="false">

    <%= csrf_meta_tags %>
    <%= csp_meta_tag %>

    <%= stylesheet_link_tag SolidusAdmin::Config.theme_path(session[:admin_light_theme]), media: '(prefers-color-scheme: light)', "data-turbo-track": "reload" %>
    <%= stylesheet_link_tag SolidusAdmin::Config.theme_path(session[:admin_dark_theme]), media: '(prefers-color-scheme: dark)', "data-turbo-track": "reload" %>
    <%= javascript_importmap_tags "solidus_admin/application", importmap: SolidusAdmin.importmap %>
    <meta name="turbo-refresh-scroll", content="preserve">
  </head>

  <body class="bg-gray-15 font-sans">
    <%= render component("layout/skip_link").new(href: "#main") %>
    <div class="flex gap-0">
      <div class="min-w-[240px] border-r border-r-gray-100 relative">
        <div class="min-h-screen top-0 sticky flex">
          <%= render component("layout/navigation").new(store: current_store) %>
        </div>
      </div>

      <main id="main" class="flex-grow">
        <%= yield %>
      </main>
    </div>

    <%= render component("layout/flashes/alerts").new(alerts:) %>
    <%= render component("layout/flashes/toasts").new(toasts:) %>
  </body>
</html>
